﻿using lyAdmin.Entity.Bean;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;

namespace lyAdmin.Repository.IRepository
{
    public interface IBaseRepository<T> : IRepository
    { 
        IQueryable<T> GetList(Expression<Func<T, bool>> fun, Expression<Func<T, int>> sort,int size=0,int page=0);
        IQueryable<T> GetListDesc(Expression<Func<T, bool>> fun, Expression<Func<T, int>> sort, int size = 0, int page = 0);
        IQueryable<T> GetListSql(QueryBean queryBean);
        T Get(Func<T, bool> fun);
        T Get(int id);
        int Add(T entity);
        int Update(T entity);
        int Delete(T entity);
    }
}
